<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Ad_ManageMessages.aspx.cs" Inherits="Ad_ManageMessages" %>
<%@ Register Src="Include/Ad_footer.ascx" TagName="Ad_footer" TagPrefix="uc3" %>
<%@ Register Src="Include/Ad_left.ascx" TagName="Ad_left" TagPrefix="uc2" %>
<%@ Register Src="Include/Ad_header.ascx" TagName="Ad_header" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">

    <title>Manage Topics Messages</title>
    <link href="include\styles.css" rel="stylesheet" />
    
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    <table width="100%"  border="0" cellspacing="0" cellpadding="0">

	<!-- Masthead starts from here-->
	
	<uc1:Ad_header ID="Ad_header1" runat="server" />
	
	<!-- Masthead ends here-->
	
  <tr>
    <td></td>
    <td><table width="716" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="150" valign="top">
		
		<!-- Left panel starts from here-->
		
		<uc2:Ad_left ID="Ad_left1" runat="server" />
		
		<!-- Left panel ends from here-->
		</td>
        <td width="15" valign="top"><img src="../images/spacer.gif" width="15" height="1" alt="" /></td>
        <td width="551" valign="top"><table width="100%"  border="0" cellpadding="0" cellspacing="0" class="tblborder">
          <tr>
            <td width="2%" height="35"></td>
            <td class="normalblack_12" align="center" style="width: 527px" ><b>Manage Topics Messages </b></td>
            <td width="2%"></td>
          </tr>
          <tr>
            <td height="200"></td>
            <td valign="top" class="normalblack_12"  align="center" style="width: 527px" > 
            
                <table border="0" width="100%">
                     <tr><td align="center">
                         <asp:Label ID="lblMsg" runat="server"></asp:Label></td></tr> 
                    <tr><td>&nbsp;</td></tr>     
                      
                    <tr><td class="normalgrey_12" align="left">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="lblName" runat="server">Select a Topic:</asp:Label>
                        <asp:DropDownList ID="ddlTopics" runat="server" OnSelectedIndexChanged="ddlTopics_SelectedIndexChanged" AutoPostBack="True" />                        
                    </td></tr> 
                    <tr><td align="center" >&nbsp;</td></tr>
                    
                    <tr><td align="center">
                        
                       <asp:GridView DataKeyNames="Id" ID="grdMessages" runat="server" AutoGenerateColumns="false" ShowFooter="true" OnRowDeleting="grdMessages_RowDeleting" OnRowDataBound="grdMessages_RowDataBound" CssClass="normalgrey_12" Width="90%" AllowPaging="True" OnPageIndexChanging="grdMessages_PageIndexChanging">  
                            <Columns>
                            
                              <asp:TemplateField >
                                    <ItemTemplate >
                                       <a href="Ad_Message.aspx?id=<%# Eval("Id") %>" ><img src="../images/editinfo.gif" border="0" alt="Edit Message" /></a>   
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        <asp:HyperLink ID="hypInsert" runat="server" NavigateUrl="Ad_Message.aspx?id=0"  ImageUrl="../images/new-imga.gif" ToolTip="Insert New Message"  /> 
                                    </FooterTemplate> 
                                
                                </asp:TemplateField>
                                
                                <asp:BoundField HeaderText="User Name" DataField="UserName"/>         
                                <asp:BoundField HeaderText="Message Text" DataField="Description"/>                                         
                                <asp:BoundField HeaderText="Posted Date/Time" DataField="DateAdded"/>
                                
                                <asp:TemplateField>
                                    <ItemTemplate >                       
                                        <asp:LinkButton CommandArgument="id"  CommandName="Delete" ID="lnkDelete" runat="server" ><img src="../images/delete.gif" border="0" alt="Delete Record" /> </asp:LinkButton>                        
                                    </ItemTemplate>                  
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                            
                            </Columns>
                                <RowStyle HorizontalAlign="Left" />
                                <FooterStyle HorizontalAlign="Left" />
                            
                            </asp:GridView>
                                           
                    
                    </td></tr> 
                    <tr><td style="width: 523px"></td></tr> 
                
                </table> 
            
            
            
            </td>
            <td></td>
          </tr>
          <tr>
            <td height="20"></td>
            <td style="width: 527px"></td>
            <td></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
    <td></td>
  </tr>
  <tr>
    <td height="30" colspan="3"></td>
  </tr>
  <tr>
    <td height="1" bgcolor="#CCCCCC"><img src="../images/spacer.gif" width="1" height="1" alt="" /></td>
    <td bgcolor="#CCCCCC"><img src="../images/spacer.gif" width="1" height="1" alt="" /></td>
    <td bgcolor="#CCCCCC"><img src="../images/spacer.gif" width="1" height="1" alt="" /></td>
  </tr>
  <tr>
    <td colspan="3" style="height: 20px"></td>
  </tr>
  
	<!-- Bottom starts from here-->
	
    <uc3:Ad_footer ID="Ad_footer1" runat="server" />
	
	<!-- Bottom ends here-->
	
</table>
    
    
    </div>
    </form>
</body>
</html>
